import Vue from 'vue'
import VueRouter from 'vue-router'
import store from '../store/index'

const UserRecommend = () => import('../views/homeRouteContent/contentViews/UserRecommend')
const PlayList = () => import('../components/playlist/PlayList')

//搜索模块
const SeachMusic = () => import('../views/homeRouteContent/contentViews/SeachMusic')
//搜索的类型模块
const SeachMV = () => import('../views/homeRouteContent/contentViews/Seach/SeachMV')
const SeachPlayList = () => import('../views/homeRouteContent/contentViews/Seach/SeachPlayList')
const SeachSinger = () => import('../views/homeRouteContent/contentViews/Seach/SeachSinger')
const SeachAlbum = () => import('../views/homeRouteContent/contentViews/Seach/SeachAlbum')
const SongSingle = () => import('../views/homeRouteContent/contentViews/Seach/SongSingle')


const PlayVideo = () => import('../components/PlayVideo')
const Login = () => import('../components/Login')



Vue.use(VueRouter)

const routes = [
  {
    path: '/recommend',
    component: UserRecommend,
    meta:{
      keepAlive:false
    }
  },
  {
    path: '/login',
    component: Login,
    meta:{
      keepAlive:false
    }
  },
  {
    path: '/playlist',
    component: PlayList,
    meta:{
      keepAlive:false
    }

  },
  {
    path: '/SeachMusic',
    component:SeachMusic,
    meta:{
      keepAlive:true
    },
    children: [
      {
        path: 'SeachMV',
        component:SeachMV,
        meta: {
          keepAlive:true,
          seach:true
        }
      },
      {
        path: 'SeachPlayList',
        component:SeachPlayList,
        meta: {
          keepAlive:true,
          seach:true
        }
      },
      {
        path: 'SeachSinger',
        component:SeachSinger,
        meta: {
          keepAlive:true,
          seach:true
        }
      },
      {
        path: 'SeachAlbum',
        component:SeachAlbum,
        meta: {
          keepAlive:true,
          seach:true
        }
      },
      {
        path: 'SongSingle',
        component:SongSingle,
        meta: {
          keepAlive:true,
          seach:true
        }
      },
    ]
  },
  {
    path: '/PlayVideo',
    component:PlayVideo,
    meta:{
      keepAlive:false
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})





export default router
